home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / tools / bison.lha / bison++-1.04 / Makefile < prev    next >
Makefile  |  1991-08-05  |  4KB  |  117 lines

  1. # Makefile for bison++
  2. #   Copyright (C) 1990, 1991 Larry M. Augustin
  3. #   Copyright (C) 1984, 1989 Bob Corbett and Free Software Foundation, Inc.
  4. # This file is part of Bison, the GNU Compiler Compiler.
  5. # Bison is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 1, or (at your option)
  8. # any later version.
  9. # Bison is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with Bison; see the file COPYING.  If not, write to
  15. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  16.  
  17. # For sysV, you must uncomment the following lines
  18. #CFLAGS = -g -DUSG
  19. #LIBS = -lPW
  20. #and comment out the assignment of CFLAGS below.
  21. #Also, if getopt.c gives any trouble, delete it from OBJECTS.
  22. #so the system's getopt will be used.
  23.  
  24.  
  25. DESTDIR=
  26. # where the installed binary goes
  27. BINDIR = /hdl/bin
  28. #BINDIR = /usr/local/bin
  29.  
  30. # where the parsers go
  31. PARSERDIR = /hdl/lib/gnu
  32. #PARSERDIR = /usr/local/lib/gnu
  33.  
  34. # names of parser files
  35. PFILE = bison++.simple.cc
  36. PFILE1 = bison++.hairy.cc
  37.  
  38. # for parallel make on a sequent, use PARALLEL=&
  39. PARALLEL=&
  40.  
  41. # It is unwise ever to compile a program without symbols.
  42. CFLAGS = -g
  43.  
  44. PFILES = -DXPFILE=\"$(PARSERDIR)/$(PFILE)\" \
  45.      -DXPFILE1=\"$(PARSERDIR)/$(PFILE1)\"
  46.  
  47. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o    \
  48.       getargs.o gram.o lalr.o lex.o                    \
  49.       main.o nullable.o output.o print.o reader.o reduce.o symtab.o    \
  50.       warshall.o version.o                        \
  51.       getopt.o
  52.  
  53. VERSION="1.04"
  54.  
  55. start: bison++
  56.  
  57. clean:
  58.     rm -f *.o core bison++ *.tar *~
  59.  
  60. install: bison++
  61.     install -c bison++ $(BINDIR)
  62.     -cd $(PARSERDIR); rm -f $(PFILE) $(PFILE1)
  63.     cp $(PFILE) $(PFILE1) $(PARSERDIR)
  64.  
  65. bison++: $(PARALLEL) $(OBJECTS)
  66.     $(CC) $(LDFLAGS) -o bison++ $(OBJECTS) $(LIBS)
  67.  
  68. dist:    bison++-$(VERSION).tar bison++-$(VERSION).tar.Z
  69.  
  70. .PHONY: bison++-$(VERSION).tar
  71. bison++-$(VERSION).tar:
  72.     -rm -rf bison++-$(VERSION)
  73.     mkdir bison++-$(VERSION)
  74.     ln  COPYING ChangeLog Makefile REFERENCES \
  75.         bison++.simple.cc bison++.hairy.cc \
  76.         LR0.c allocate.c closure.c conflicts.c derives.c \
  77.         files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  78.         output.c print.c reader.c reduce.c symtab.c version.c \
  79.         warshall.c files.h gram.h lex.h machine.h new.h state.h \
  80.         symtab.h types.h bison++.cld build.com vmsgetargs.c vmshlp.mar \
  81.         README \
  82.       bison++-$(VERSION)
  83.     cp getopt.c bison++-$(VERSION)
  84.  
  85.     tar chvf bison++-$(VERSION).tar bison++-$(VERSION)
  86.  
  87. bison++-$(VERSION).tar.Z: bison++-$(VERSION).tar
  88.     compress < bison++-$(VERSION).tar > bison++-$(VERSION).tar.Z
  89.  
  90. TAGS: *.c *.h
  91.     etags *.c *.h
  92.  
  93. # This file is different to pass the parser file names
  94. # to the compiler.
  95. files.o: files.c files.h new.h gram.h
  96.     $(CC) -c $(CFLAGS) $(PFILES) files.c
  97.  
  98. LR0.o: machine.h new.h gram.h state.h
  99. closure.o: machine.h new.h gram.h
  100. conflicts.o: machine.h new.h files.h gram.h state.h
  101. derives.o: new.h types.h gram.h
  102. getargs.o: files.h
  103. lalr.o: machine.h types.h state.h new.h gram.h
  104. lex.o: files.h symtab.h lex.h
  105. main.o: machine.h
  106. nullable.o: types.h gram.h new.h
  107. output.o: machine.h new.h files.h gram.h state.h
  108. print.o: machine.h new.h files.h gram.h state.h
  109. reader.o: files.h new.h symtab.h lex.h gram.h
  110. reduce.o: files.h new.h machine.h gram.h
  111. symtab.o: new.h symtab.h gram.h
  112. warshall.o: machine.h
  113.